/*
 * @Author: y001554
 * @Date: 2023-01-16 20:11:08
 * @LastEditors: y001554
 * @LastEditTime: 2023-02-16 20:30:28
 * @FilePath: \ylwl\packages\plugins\components\pages\src\type.ts
 * @Description:
 *
 * Copyright (c) 2023 by FE/ylwl, All Rights Reserved.
 */
import type { PropType, ExtractPropTypes } from 'vue'
import type { FormItemProps, InputProps } from 'element-plus'
export interface FormOptions {
  [key: string]: any
}
export interface TableOptions {
  [key: string]: any
}

export interface Params {
  page: number
  size: number
  [key: string]: any
}

export const componentProps = {
  formOptions: {
    type: Object as PropType<FormOptions>,
    default: () => ({})
  },

  tableOptions: {
    type: Object as PropType<TableOptions>,
    default: () => ({})
  },
  extraParams: {
    type: Object as PropType<TableOptions>,
    default: () => ({})
  },
  request: {
    type: Function,
    required: true
  },
  sticky: {
    type: Boolean,
    default: true
  }
  // formMode: {
  //   type: String,
  //   default: 'block'
  // }
} as const

export type ComponentProps = ExtractPropTypes<typeof componentProps>
